900 |
How can I prevent a link to end to a specified bar
with thisform.G2antt1 .BeginUpdate .Columns.Add("Tasks") with .Chart .AllowLinkBars = .T. .LevelCount = 2 .PaneWidth(0) = 160 .FirstVisibleDate = {^2005-6-20} endwith with .Items h = .AddItem("Not-End-Linkable") .AddBar(h,"Unknown",{^2005-6-21},{^2005-6-28}) .DefaultItem = h .ItemBar(0,"",31) = .F. .AddBar(.AddItem("Task 1"),"Task",{^2005-6-23},{^2005-6-27},"") .AddBar(.AddItem("Task 2"),"Task",{^2005-6-23},{^2005-6-27},"") endwith .EndUpdate endwith |
899 |
How can I prevent a link to start from a specified bar
with thisform.G2antt1 .BeginUpdate .Columns.Add("Tasks") with .Chart .AllowLinkBars = .T. .LevelCount = 2 .PaneWidth(0) = 160 .FirstVisibleDate = {^2005-6-20} endwith with .Items h = .AddItem("Not-Start-Linkable") .AddBar(h,"Unknown",{^2005-6-21},{^2005-6-28}) .DefaultItem = h .ItemBar(0,"",30) = .F. .AddBar(.AddItem("Task 1"),"Task",{^2005-6-23},{^2005-6-27},"") .AddBar(.AddItem("Task 2"),"Task",{^2005-6-23},{^2005-6-27},"") endwith .EndUpdate endwith |
898 |
How can I prevent a specified bar to be linked
with thisform.G2antt1 .BeginUpdate .Columns.Add("Tasks") with .Chart .AllowLinkBars = .T. .LevelCount = 2 .PaneWidth(0) = 160 .FirstVisibleDate = {^2005-6-20} endwith with .Items h = .AddItem("Not-Linkable") .AddBar(h,"Unknown",{^2005-6-21},{^2005-6-28}) .DefaultItem = h .ItemBar(0,"",32) = .F. .AddBar(.AddItem("Task 1"),"Task",{^2005-6-23},{^2005-6-27},"") .AddBar(.AddItem("Task 2"),"Task",{^2005-6-23},{^2005-6-27},"") endwith .EndUpdate endwith |
897 |
How can I display in the chart's header only days where the week starts
|
896 |
Is there any automatically way to display and change the bar's duration in the columns section
|
895 |
How can I programatically move or resize a bar using spin or slider controls in the columns
|
894 |
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
with thisform.G2antt1 .BeginUpdate .Columns.Add("Tasks") with .Chart .PaneWidth(0) = 64 .FirstVisibleDate = {^2005-6-21} .ShowEmptyBars = 1 endwith with .Items h = .AddItem("Test") .AddBar(h,"Task",{^2005-6-22},{^2005-6-26},"") .AddBar(h,"Task",{^2005-6-27},.ItemBar(h,"",2)) endwith .EndUpdate endwith |
893 |
How can change in the same time the starting and ending points of the bar
with thisform.G2antt1 .BeginUpdate .Columns.Add("Tasks") with .Chart .PaneWidth(0) = 64 .FirstVisibleDate = {^2005-6-21} .ShowEmptyBars = 1 endwith with .Items h = .AddItem("Test") .AddBar(h,"Task",{^2005-6-22},{^2005-6-26}) endwith with .Items h = .FirstVisibleItem .AddBar(h,"Task",{^2005-6-27},{^2005-6-29}) endwith .EndUpdate endwith |
892 |
How can I control the exBarEffort property of the bar using slider controls
|
891 |
How can I determine if there is any Redo operation
with thisform.G2antt1 with .Chart .AllowUndoRedo = .T. .LevelCount = 2 .FirstVisibleDate = {^2001-1-1} endwith .Columns.Add("Column") with .Items .AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4}) .AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7}) endwith var_CanRedo = .Chart.CanRedo endwith |
890 |
How can I determine if there is any Undo operation
with thisform.G2antt1 with .Chart .AllowUndoRedo = .T. .LevelCount = 2 .FirstVisibleDate = {^2001-1-1} endwith .Columns.Add("Column") with .Items .AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4}) .AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7}) endwith var_CanUndo = .Chart.CanUndo endwith |
889 |
How can I turn on the Undo/Redo feature
with thisform.G2antt1 with .Chart .AllowUndoRedo = .T. .LevelCount = 2 .FirstVisibleDate = {^2001-1-1} endwith .Columns.Add("Column") with .Items .AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4}) .AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7}) endwith endwith |
888 |
How can I disable resizing the histogram at runtime
with thisform.G2antt1 .OnResizeControl = 256 with .Chart .FirstVisibleDate = {^2001-1-1} .HistogramVisible = .T. .HistogramHeight = 32 .Bars.Item("Task").HistogramPattern = 6 endwith .Columns.Add("Column") with .Items .AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4}) .AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7}) endwith endwith |
887 |
How can I display automatically the start and end dates of the bars in the columns section
|
886 |
How can I enable Undo/Redo support
with thisform.G2antt1 .BeginUpdate .MarkSearchColumn = .F. .DrawGridLines = 1 with .Columns .Add("Tasks") with .Add("Start") .Def(18) = 1 .Editor.EditType = 7 .LevelKey = 1 endwith with .Add("End") .Def(18) = 2 .Editor.EditType = 7 .LevelKey = 1 endwith endwith with .Chart .DrawGridLines = 1 .FirstVisibleDate = {^2006-9-20} .AllowLinkBars = .T. .AllowCreateBar = 0 .LevelCount = 2 .PaneWidth(0) = 196 .AllowUndoRedo = .T. endwith with .Items .AllowCellValueToItemBar = .T. .AddBar(.AddItem("Task 1"),"Task",{^2006-9-21},{^2006-9-24}) .AddBar(.AddItem("Task 2"),"Task",{^2006-9-22},{^2006-9-25}) .AddBar(.AddItem("Task 3"),"Task",{^2006-9-23},{^2006-9-26}) endwith .EndUpdate endwith |
885 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )
|
884 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )
|
883 |
How can I group two bars so I can specify the range or the limit of the interval between them
|
882 |
How can I group my bars so I can resize the interval between them but still keep the lengths of them
|
881 |
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars
|
880 |
How can I split the time scale, so a section displays days, while other displays weeks, and the other months
|
879 |
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files
|
878 |
Does your control support RightToLeft property for RTL languages or right to left
with thisform.G2antt1 .BeginUpdate .ScrollBars = 15 .LinesAtRoot = -1 with .Columns.Add("P1") .Def(0) = .T. .PartialCheck = .T. endwith with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .DefaultItem = h .ExpandItem(0) = .T. endwith .RightToLeft = .T. .EndUpdate endwith |
877 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
|
876 |
Can I display the cell's check box after the text
with thisform.G2antt1 with .Columns.Add("Column") .Def(0) = .T. .Def(34) = "caption,check" endwith with .Items .DefaultItem = .AddItem("Caption 1") .CellHasCheckBox(0,0) = .T. .DefaultItem = .AddItem("Caption 2") .CellHasCheckBox(0,0) = .T. endwith endwith |
875 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
with thisform.G2antt1 var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql" var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0" var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN" var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Images(var_s) .Columns.Add("Column").Def(34) = "caption,check,icon,icons,picture" with .Items h = .AddItem("Text") .DefaultItem = h .CellImage(0,0) = 1 .DefaultItem = h .CellHasCheckBox(0,0) = .T. endwith endwith |
874 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
with thisform.G2antt1 var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql" var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0" var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN" var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Images(var_s) .Columns.Add("Column").Def(34) = "caption,icon,check,icons,picture" with .Items h = .AddItem("Text") .DefaultItem = h .CellImage(0,0) = 1 endwith endwith |
873 |
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor
|
872 |
Is there any option to print the columns section on each page
|
871 |
How can I add a different non-working area for different items
|
870 |
How can I define different non-working units for different items
|
869 |
I want to define/highlight for specified dates as being non-working. Is this possible
|
868 |
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days
|
867 |
How can I define my own/custom labels and subdivisions
|
866 |
I want to mark or highlight the last Friday of the month. Is there any option to do that
|
865 |
I use the SelectDate method but the dates are not being highligted. What can I do
|
864 |
Can I use ebn files to display the selected dates
|
863 |
Can I use ebn files to display the selected dates
|
862 |
How can I change the color for selected dates to be solid
|
861 |
How can I disable selecting dates when I click the chart's header
|
860 |
Is there any option to specify which dates can be magnified or resized
|
859 |
How can I change the width for a specified date time unit
|
858 |
How can I disable the control's splitter so the user can't resize the list area
|
857 |
How can I disable the control's splitter so the user can't resize the chart area
|
856 |
How can I change the label for a specified unit
|
855 |
How can I bold the inside units
|
854 |
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )
|
853 |
How can I zoom or magnify the selected date to display the hours, from 8 to 8
|
852 |
How can I zoom or magnify the selected date to display the hours
|
851 |
How can I change the foreground color for a time unit
|
850 |
How can I change the background color for a time unit, in the chart area
|
849 |
How can I change the background color for a time unit, using EBN files
|
848 |
How can I change the background color for a time unit
|
847 |
How can I display the column using currency format and enlarge the font for certain values
with thisform.G2antt1 with .Columns.Add("Currency") .Def(17) = 1 .FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)" endwith with .Items .AddItem("1.23") .AddItem("2.34") .AddItem("9.94") .AddItem("11.94") .AddItem("1000") endwith endwith |
846 |
How can I highlight only parts of the cells
with thisform.G2antt1 with .Columns.Add("") .Def(17) = 1 .FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'" endwith with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"Child 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
845 |
How can I get the number of occurrences of a specified string in the cell
with thisform.G2antt1 .Columns.Add("") with .Columns.Add("occurrences") .ComputedField = "lower(%0) count 'o'" .FormatColumn = "'contains ' + value + ' of \'o\' chars'" endwith with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1 oooof the root") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"Child 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
844 |
How can I display dates in my format
with thisform.G2antt1 with .Columns.Add("Date") .Def(17) = 1 .FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'" endwith with .Items .AddItem({^2001-1-21}) .AddItem({^2002-2-22}) .AddItem({^2003-3-13}) .AddItem({^2004-4-24}) endwith endwith |
843 |
How can I display dates in short format
with thisform.G2antt1 .Columns.Add("Date").FormatColumn = "shortdate(value)" with .Items .AddItem({^2001-1-1}) .AddItem({^2002-2-2}) .AddItem({^2003-3-3}) .AddItem({^2004-4-4}) endwith endwith |
842 |
How can I display dates in long format
with thisform.G2antt1 .Columns.Add("Date").FormatColumn = "longdate(value)" with .Items .AddItem({^2001-1-1}) .AddItem({^2002-2-2}) .AddItem({^2003-3-3}) .AddItem({^2004-4-4}) endwith endwith |
841 |
How can I display only the right part of the cell
with thisform.G2antt1 .Columns.Add("") with .Columns.Add("Right") .ComputedField = "%0 right 2" .FormatColumn = "'"+chr(34)+"' + value + '"+chr(34)+"'" endwith with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"SChild 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
840 |
How can I display only the left part of the cell
with thisform.G2antt1 .Columns.Add("") .Columns.Add("Left").ComputedField = "%0 left 2" with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"SChild 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
839 |
How can I display true or false instead 0 and -1
with thisform.G2antt1 .Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'" with .Items .AddItem(.T.) .AddItem(.F.) .AddItem(.T.) .AddItem(0) .AddItem(1) endwith endwith |
838 |
Is there any option to print the columns section on each page
|
837 |
How do I print the control's content
|
836 |
How can I display icons or images instead numbers
with thisform.G2antt1 var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql" var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0" var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN" var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=" .Images(var_s) with .Columns.Add("Icons") .Def(17) = 1 .FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value" endwith with .Items .AddItem(1) .AddItem(2) .AddItem(3) endwith endwith |
835 |
How can I display the column using currency
with thisform.G2antt1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" with .Items .AddItem("1.23") .AddItem("2.34") .AddItem("0") .AddItem(5) .AddItem("10000.99") endwith endwith |
834 |
How can I display the currency only for not empty cells
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''" with .Items .AddItem("1.23") .AddItem("2.34") .AddItem("0") .DefaultItem = .AddItem() .ItemBackColor(0) = RGB(255,128,128) .AddItem("10000.99") endwith endwith |
833 |
Is there a function to display the number of days between two date including the number of hours
with thisform.G2antt1 .Columns.Add("Start").Width = 32 .Columns.Add("End") var_s = "((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*" var_s = var_s + "24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')" .Columns.Add("Duration").ComputedField = var_s with .Items h = .AddItem({^2001-1-11}) .DefaultItem = h .CellValue(0,1) = {^2001-1-14} h = .AddItem({^2002-2-22 12:00:00}) .DefaultItem = h .CellValue(0,1) = {^2002-3-14 13:00:00} h = .AddItem({^2003-3-13}) .DefaultItem = h .CellValue(0,1) = {^2003-4-11 11:00:00} endwith endwith |
832 |
Is there a function to display the number of days between two date including the number of hours
with thisform.G2antt1 .Columns.Add("Start") .Columns.Add("End") .Columns.Add("Duration").ComputedField = ""+chr(34)+"D "+chr(34)+" + int(date(%1)-date(%0)) + "+chr(34)+" H "+chr(34)+" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))" with .Items h = .AddItem({^2001-1-11}) .DefaultItem = h .CellValue(0,1) = {^2001-1-14 23:00:00} h = .AddItem({^2002-2-22 12:00:00}) .DefaultItem = h .CellValue(0,1) = {^2002-3-14 13:00:00} h = .AddItem({^2003-3-13}) .DefaultItem = h .CellValue(0,1) = {^2003-4-11 11:00:00} endwith endwith |
831 |
How can I display the number of days between two dates
with thisform.G2antt1 .Columns.Add("Start") .Columns.Add("End") .Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'" with .Items h = .AddItem({^2001-1-11}) .DefaultItem = h .CellValue(0,1) = {^2001-1-14} h = .AddItem({^2002-2-22}) .DefaultItem = h .CellValue(0,1) = {^2002-3-14} h = .AddItem({^2003-3-13}) .DefaultItem = h .CellValue(0,1) = {^2003-4-11} endwith endwith |
830 |
How can I get second part of the date
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Second").ComputedField = "sec(date(%0))" with .Items .AddItem({^2001-1-11 10:10:00}) .AddItem({^2002-2-22 11:01:22}) .AddItem({^2003-3-13 12:23:01}) .AddItem({^2004-4-14 13:11:59}) endwith endwith |
829 |
How can I get minute part of the date
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Minute").ComputedField = "min(date(%0))" with .Items .AddItem({^2001-1-11 10:10:00}) .AddItem({^2002-2-22 11:01:00}) .AddItem({^2003-3-13 12:23:00}) .AddItem({^2004-4-14 13:11:00}) endwith endwith |
828 |
How can I check the hour part only so I know it was afternoon
with thisform.G2antt1 .ConditionalFormats.Add("hour(%0)>=12").Bold = .T. .Columns.Add("Date") .Columns.Add("Hour").ComputedField = "hour(%0)" with .Items .AddItem({^2001-1-11 10:00:00}) .AddItem({^2002-2-22 11:00:00}) .AddItem({^2003-3-13 12:00:00}) .AddItem({^2004-4-14 13:00:00}) endwith endwith |
827 |
What about a function to get the day in the week, or days since Sunday
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("WeekDay").ComputedField = "weekday(%0)" with .Items .AddItem({^2001-1-11 10:00:00}) .AddItem({^2002-2-22 11:00:00}) .AddItem({^2003-3-13 12:00:00}) .AddItem({^2004-4-14 13:00:00}) endwith endwith |
826 |
Is there any function to get the day of the year or number of days since January 1st
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Day since January 1st").ComputedField = "yearday(%0)" with .Items .AddItem({^2001-1-11 10:00:00}) .AddItem({^2002-2-22 11:00:00}) .AddItem({^2003-3-13 12:00:00}) .AddItem({^2004-4-14 13:00:00}) endwith endwith |
825 |
How can I display only the day of the date
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Day").ComputedField = "day(%0)" with .Items .AddItem({^2001-1-11 10:00:00}) .AddItem({^2002-2-22 11:00:00}) .AddItem({^2003-3-13 12:00:00}) .AddItem({^2004-4-14 13:00:00}) endwith endwith |
824 |
How can I display only the month of the date
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Month").ComputedField = "month(%0)" with .Items .AddItem({^2001-1-1 10:00:00}) .AddItem({^2002-2-2 11:00:00}) .AddItem({^2003-3-3 12:00:00}) .AddItem({^2004-4-4 13:00:00}) endwith endwith |
823 |
How can I get only the year part from a date expression
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Year").ComputedField = "year(%0)" with .Items .AddItem({^2001-1-1 10:00:00}) .AddItem({^2002-2-2 11:00:00}) .AddItem({^2003-3-3 12:00:00}) .AddItem({^2004-4-4 13:00:00}) endwith endwith |
822 |
Can I convert the expression to date
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Date").ComputedField = "date(dbl(%0))" with .Items .AddItem("-1.98") .AddItem("30000.99") .AddItem("3561.23") .AddItem("1232.34") endwith endwith |
821 |
Can I convert the expression to a number, double or float
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Number + 2").ComputedField = "dbl(%0)+2" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
820 |
How can I display dates in long format
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("LongFormat").ComputedField = "longdate(%0)" with .Items .AddItem({^2001-1-1 10:00:00}) .AddItem({^2002-2-2 11:00:00}) .AddItem({^2003-3-3 12:00:00}) .AddItem({^2004-4-4 13:00:00}) endwith endwith |
819 |
How can I display dates in short format
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("ShortFormat").ComputedField = "shortdate(%0)" with .Items .AddItem({^2001-1-1 10:00:00}) .AddItem({^2002-2-2 11:00:00}) .AddItem({^2003-3-3 12:00:00}) .AddItem({^2004-4-4 13:00:00}) endwith endwith |
818 |
How can I display the time only of a date expression
with thisform.G2antt1 .Columns.Add("Date") .Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))" with .Items .AddItem({^2001-1-1 10:00:00}) .AddItem({^2002-2-2 11:00:00}) .AddItem({^2003-3-3 12:00:00}) .AddItem({^2004-4-4 13:00:00}) endwith endwith |
817 |
Is there any function to display currencies, or money formatted as in the control panel
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Currency").ComputedField = "currency(dbl(%0))" with .Items .AddItem(1.23) .AddItem(2.34) .AddItem(10000.99) endwith endwith |
816 |
How can I convert the expression to a string so I can look into the date string expression for month's name
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Str").ComputedField = "str(%0) + ' AA'" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
815 |
Can I display the absolute value or positive part of the number
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Abs").ComputedField = "abs(%0)" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
814 |
Is there any function to get largest number with no fraction part that is not greater than the value
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Floor").ComputedField = "floor(%0)" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
813 |
Is there any function to round the values base on the .5 value
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Round").ComputedField = "round(%0)" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
812 |
How can I get or display the integer part of the cell
with thisform.G2antt1 .Columns.Add("Number") .Columns.Add("Int").ComputedField = "int(%0)" with .Items .AddItem("-1.98") .AddItem("0.99") .AddItem("1.23") .AddItem("2.34") endwith endwith |
811 |
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
with thisform.G2antt1 .Columns.Add("").FormatColumn = "proper(%0)" with .Items h = .AddItem("root") .InsertItem(h,Null,"child child") .InsertItem(h,Null,"child child") .InsertItem(h,Null,"child child") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
810 |
Is there any option to display cells in uppercase
with thisform.G2antt1 .Columns.Add("").FormatColumn = "upper(%0)" with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"Chld 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
809 |
Is there any option to display cells in lowercase
with thisform.G2antt1 .Columns.Add("").FormatColumn = "lower(%0)" with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"Chld 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
808 |
How can I mark the cells that has a specified type, ie strings only
with thisform.G2antt1 .ConditionalFormats.Add("type(%0) = 8").ForeColor = RGB(255,0,0) .Columns.Add("") with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,2) .InsertItem(h,Null,"Chld 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
807 |
How can I bold the items that contains data or those who displays empty strings
with thisform.G2antt1 .ConditionalFormats.Add("not len(%1)=0").Bold = .T. .Columns.Add("C1") .Columns.Add("C2") with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") hC = .InsertItem(h,Null,"Child 2") .DefaultItem = hC .CellValue(0,1) = "1" .InsertItem(h,Null,"Child 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
806 |
Can I change the background color for items or cells that contains a specified string
with thisform.G2antt1 .ConditionalFormats.Add("%0 contains 'hi'").BackColor = RGB(255,0,0) .Columns.Add("") with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"Chld 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
805 |
Is there any option to change the fore color for cells or items that ends with a specified string
with thisform.G2antt1 .ConditionalFormats.Add("%0 endwith '22'").ForeColor = RGB(255,0,0) .Columns.Add("") with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 1.22") .InsertItem(h,Null,"Child 2.22") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
804 |
How can I highlight the cells or items that starts with a specified string
with thisform.G2antt1 .ConditionalFormats.Add("%0 startwith 'C'").Underline = .T. .Columns.Add("") with .Items h = .AddItem("Root") .InsertItem(h,Null,"Child 1") .InsertItem(h,Null,"Child 2") .InsertItem(h,Null,"SChild 3") .DefaultItem = h .ExpandItem(0) = .T. endwith endwith |
803 |
How can I change the background color or the visual appearance using ebn for a particular column
with thisform.G2antt1 .VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") with .Columns .Add("Column 1") .Add("Column 2").Def(7) = 16777216 .Add("Column 3").Def(7) = 16777471 .Add("Column 4") endwith endwith |
802 |
How can I change the foreground color for a particular column
|
801 |
How can I change the background color for a particular column
|